﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="frmListarProducto.aspx.cs" Inherits="Intelsi.WB.frmListarProducto" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="post">
			<h2 class="title">Lista de Productos</h2>
</div>
<asp:UpdatePanel ID ="Uppeltrab" runat="server">
    <ContentTemplate>
        <fieldset>
        <br />
            <asp:LinkButton ID="lbHe" runat="server" 
                PostBackUrl="~/REPORTES/frmReporteHerramientas.aspx">Reporte Herramientas</asp:LinkButton>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:LinkButton ID="lbMa" runat="server" 
                PostBackUrl="~/REPORTES/frmReporteMateriales.aspx">Reporte Materiales</asp:LinkButton>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:LinkButton ID="lbEp" runat="server" 
                PostBackUrl="~/REPORTES/frmReporteEpps.aspx">Reporte Epps</asp:LinkButton>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:LinkButton ID="lbEq" runat="server" 
                PostBackUrl="~/REPORTES/frmReporteEquipos.aspx">Reporte Equipos</asp:LinkButton>
        <br />
        <br />
            <asp:Button ID="btnNuevo" runat="server" Text="Nuevo Producto" 
                onclick="btnNuevo_Click" />
            <br />
            <br />
            <b>Descripcion:&nbsp; </b>
            <asp:TextBox ID="txtBuscar" runat="server" Width="313px"></asp:TextBox>
            &nbsp;<asp:Button ID="btnBuscar"
                runat="server" Text="Buscar" />
        </fieldset>
        <fieldset>
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                onobjectcreating="ObjectDataSource1_ObjectCreating" 
                SelectMethod="GtFromProductoByDescripcion" 
                TypeName="Intelsi.BusinessLogic.ProductoBL">
                <SelectParameters>
                    <asp:ControlParameter ControlID="txtBuscar" Name="descripcion" 
                        PropertyName="Text" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                AutoGenerateColumns="False" CellPadding="4" DataSourceID="ObjectDataSource1" 
                ForeColor="#333333" GridLines="None">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField DataField="Codigo" HeaderText="Codigo" 
                        SortExpression="Codigo" />
                    <asp:BoundField DataField="Nombre" HeaderText="Nombre" 
                        SortExpression="Nombre" />
                    <asp:BoundField DataField="PrecioCompra" HeaderText="PrecioCompra" 
                        SortExpression="PrecioCompra" />
                    <asp:BoundField DataField="Stock" HeaderText="Stock" SortExpression="Stock" />
                    <asp:BoundField DataField="Marca" HeaderText="Marca" SortExpression="Marca" />
                    <asp:BoundField DataField="Estado" HeaderText="Estado" 
                        SortExpression="Estado" />
                    <asp:TemplateField HeaderText="Acciones">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" 
                                PostBackUrl='<%# Eval("IdProducto","FrmProducto.aspx?acc=editar&IdProd={0}" ) %>'>Editar</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                <SortedDescendingHeaderStyle BackColor="#4870BE" />
            </asp:GridView>
        </fieldset>
    </ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
